class baseclass():
    '''this is a base class
    '''
    def go(self):
        print 'base go()'
        
    def testgo(self):
        self.go()
        
class deriveclass(baseclass):
    def go(self):
        print 'deriveclass go()'
        
        
        
def test_inspect():
    b = baseclass()
    d = deriveclass()
    import inspect
    print inspect.isclass(b)
    print inspect.isclass(deriveclass)
    print inspect.getdoc(b)
    print inspect.getsource(deriveclass)
    
    
# def runAbout():
#     CallDisplayAboutMe = CallDisplayAboutMe(parenet)
# 
# def runBinary():
#     ctypes.windll.Shell32.ShellExceuteA(0,'open','binaries\\TestBinary.exe',None,None,10)
# 
# def runCMD():
#     ctypes.windll.Shell32.ShellExecuteA(0,'open','cmd.exe','/k ipconfig', None, 10)

    
def test_code_for_file():
    with open('C:\\Users\\vison\\Desktop\\linux_robot_install.txt') as f:
#         for line in f:
#             print line
        print f.name        

    test_string = '''
#             print line
        print f.next()
    '''
    iter_list = iter(test_string.splitlines())
    print type(iter_list)
    while True:
        try:
            print iter_list.next()
        except StopIteration,e:
            print e
            break
        
def test_code_regular_express():
    test_str = '''abc
abcwoshishei.com
abcnishishei
dctashishei
    '''
    import re
#     reg = re.compile('^abc\w',re.M)
#     reg = re.compile('^abc\w')
    reg = re.compile('^abc.....*.com', re.M|re.S)
    res = reg.findall(test_str)
    print res
            
        
    
if __name__ == '__main__':
#     dc = deriveclass()
#     dc.testgo()
#     test_code_for_file()
    test_code_regular_express()
    